package com.File.A01File;

import java.io.File;

public class A08 {
    public static void main(String[] args) {
        // 创建file对象
        File file = new File("D:\\\\TestFile\\\\TestFileRead");
        File[] files = file.listFiles();
        for (File file1 : files) {
            if(file1.isFile() && file1.getName().endsWith(".txt")){
                System.out.println(file1);
            }
        }
    }
}
